home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_06 / strmidi.h < prev    next >
Text File  |  1995-01-01  |  2KB  |  79 lines

  1. /*
  2.     MIDI.H
  3.  
  4.     Marc savary, 88-03-31
  5.  
  6.     Structures & defines for MIDI Supplement.
  7.  
  8. */
  9.  
  10. #define MAX_MIDI_PITCH        0x3fff    /* max. pitch bend ... 2 ** 14 */
  11.  
  12. #define NR_MIDI_CHANNELS    16
  13. #define ADLIB_CHANNEL        16
  14.  
  15. #define MPU_TICS    96                /* MPU-401 ticks par beat */
  16.  
  17. #define NR_SPLITS    N_ROLL_VOICES
  18. #define NR_PLAGES    ( 2* N_ROLL_VOICES)
  19.  
  20. #define MIDIVAR_FILL_SIZE    128
  21. #define MIDI_VERSION        2
  22.  
  23. #define DEFAULT_MIDI_PRESET    255    /* preset # not defined */
  24.  
  25. #define LP_MEASURE    0
  26. #define LP_BEAT    1
  27. #define LP_TICK    2
  28.  
  29. struct plage_str {
  30.     int    hautEntree;
  31.     int deltaOrg;
  32.     };
  33.  
  34. struct midi_vars {
  35.     int        midiVersion_;
  36.     int        recInChannel_[ N_ROLL_VOICES];
  37.     int     recOutChannel_[ N_ROLL_VOICES];
  38.     int        playBackChannel_[ N_ROLL_VOICES];
  39.     int     hautSplits_[ NR_SPLITS];
  40.     struct    plage_str plages_[ NR_PLAGES];
  41.     int     splitOfVoices_[ N_ROLL_VOICES];
  42.     int     busySplits_;
  43.     int     busyPlages_;
  44.     char    loopLength_[ 3][ N_ROLL_VOICES];
  45.     char    outProgChange_[ N_ROLL_VOICES];
  46.     unsigned inQuantif_[ N_ROLL_VOICES];
  47.     unsigned outQuantif_[ N_ROLL_VOICES];
  48.     unsigned pitchRange_;
  49.     float    minVelocity_;
  50.     float    veloResolution_;
  51.     char    inProgChange_[ N_ROLL_VOICES];
  52.     int        syncIn_;
  53.     char    midiFiller_[ MIDIVAR_FILL_SIZE];
  54.     };
  55.  
  56. #define recInChannel    (midiVar.recInChannel_)
  57. #define recOutChannel    (midiVar.recOutChannel_)
  58. #define voiceToChannel    (midiVar.playBackChannel_)
  59. #define hautSplits        (midiVar.hautSplits_)
  60. #define plages            (midiVar.plages_)
  61. #define splitOfVoices    (midiVar.splitOfVoices_)
  62. #define busySplits        (midiVar.busySplits_)
  63. #define busyPlages        (midiVar.busyPlages_)
  64. #define loopLength        (midiVar.loopLength_)
  65. #define quantif        (midiVar.inQuantif_)
  66. #define outQuantif        (midiVar.outQuantif_)
  67. #define outProgChange    (midiVar.outProgChange_)
  68. #define inProgChange    (midiVar.inProgChange_)
  69. #define pitchRange        (midiVar.pitchRange_)
  70. #define minVelocity    (midiVar.minVelocity_)
  71. #define veloResolution    (midiVar.veloResolution_)
  72. #define midiVersion    (midiVar.midiVersion_)
  73. #define syncIn            (midiVar.syncIn_)
  74. #define midiFiller        (midiVar.midiFiller_)
  75.  
  76. extern struct midi_vars midiVar;
  77.  
  78.  
  79.